package com.cqut.service;

import com.cqut.VO.result.ResultVO;
import com.cqut.entity.FileAttachment;
import com.cqut.entity.FileDirectory;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface FileService {

    ResponseEntity<byte[]> downloadFile(String dirName,String fileName);

    ResultVO<Boolean> uploadFile(MultipartFile file,String userName,String dirName);

    ResultVO<Boolean> createDir(String userName,String dirName,String parenDirName);

    ResultVO<Boolean> deleteFile(String userName,String filePath,String fileName);

    ResultVO<Boolean> deleteDir(String userName,String dirName);

    ResultVO<Boolean> moveIo(String userName,String dirName,String newName);

    ResultVO<List<FileAttachment>> getFileList(String userName,String dirName);

    ResultVO<List<FileDirectory>> getDirList(String userName,String dirName);
}
